package com.njd.test.controller;

import java.util.HashMap;

import com.jfinal.core.Controller;
import com.njd.test.autocreatedentity.AutoCreatedEntityName;  
import com.njd.test.config.JfinalConfig;

public class IndexController extends Controller {
	
	public void index() {
//		String[] tableName = {
//				"data",
//				"project",
//				"module"
//		};
//		
//		new AutoCreatedEntityName().created(tableName, "com.njd.test.entity");
		
		
//		renderHtml("<a href=\""+ JfinalConfig.BASE_PATH +"chart\">跳转到图表</a>");
		
		setAttr("basePath", JfinalConfig.BASE_PATH);
	}
	
	public void testJson() {
		HashMap<String, String> map = new HashMap<String, String>();
		
		map.put("id", "1");
		map.put("name", "johnson");
		map.put("result", "1");
		map.put("message", "success,成功");
		
		
		renderJson(map);
	}
}
